<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" href="/assets/layui/css/layui.css"/>
<script src="/assets/layui/layui.js"></script>
<form class="layui-form" action="" enctype="multipart/form-data" method="POST" > <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
    <div class="layui-form-item">
      <label class="layui-form-label" style="width: 130px; margin-left:-35px;">手机号:</label>
      <div class="layui-input-block" style="width:260px;">
        <input type="text" name="mobile" value=" " required  lay-verify="required"   id="mobile" placeholder="请输入手机号"   autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">登录密码:</label>
                    <div class="layui-input-block" style="width:260px;">
              <input type="text" name="password" id="password" value=" "  required  lay-verify="required" class="layui-input">
            </div>
          </div>
 
    <div class="layui-form-item">
            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">城市:</label>
            <div class="layui-input-block" style="width:260px; "> 
               
                    <!-- 省份 -->
    <select name="city" id="city"  required  lay-verify="required" >
      {volist name="list" id="vo"}
      <option value="{$vo['id']}">{$vo['areaname']}</option>
      {/volist}
    </select>     
            </div>
          </div>


    <div class="layui-form-item">
            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">姓名:</label>
            <div class="layui-input-block" style="width:260px;">
              <input type="text" name="truename" value=" " required  lay-verify="required"  id="truename" placeholder="请输入姓名"   autocomplete="off" class="layui-input">
            </div>
          </div>
      
          <div class="layui-form-item">
                <label class="layui-form-label" style="width: 130px; margin-left:-35px;">性别:</label>
                <div class="layui-input-block" style="width:260px;">
                  <input type="radio" name="gender"value="0" />保密				
                 <input type="radio" name="gender"value="1" />男							
                 <input type="radio" name="gender"value="2" />女		
                </div>
              </div>

    
    <div class="layui-form-item">
            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">身份证:</label>
            <div class="layui-input-block" style="width:260px;">
              <input type="text" name="id_number" value=" " id="id_number" placeholder="请输入身份证"   autocomplete="off" class="layui-input" required  lay-verify="required">
            </div>
          </div>



          <div class="layui-form-item">
                <label class="layui-form-label" style="width: 130px; margin-left:-35px;">现居地:</label>
                <div class="layui-input-block" style="width:260px;">
                  <input type="text" name="adress" value=" " id="adress" placeholder="请输入现居地"   autocomplete="off" class="layui-input">
                </div>
              </div>

              <div class="layui-form-item">
                    <label class="layui-form-label" style="width: 130px; margin-left:-35px;">第二联系人:</label>
                    <div class="layui-input-block" style="width:260px;">
                      <input type="text" name="urgent_phone" value=" " id="urgent_phone" placeholder="请输入第二紧急联系人"   autocomplete="off" class="layui-input">
                    </div>
                  </div>



                  <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 130px; margin-left:-35px;">从事职业:</label>
                    <div class="layui-input-block" style="width:260px;">
                          <input type="text" name="career" value=" " placeholder="请输入从事职业"   autocomplete="off" class="layui-input">
                        </div>
                      </div>

                         
                      <div class="layui-form-item">
                            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">图像:</label>
                        <div class="layui-input-block" style="width:260px;">
                               <input type="file" name="avatar"  required  lay-verify="required">
                            </div>
                          </div>
    

                      <div class="layui-form-item">
                            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">等级:</label>
                            <div class="layui-input-block" style="width:260px;">
                            
                                <select name="level" lay-verify="required">
                                  {volist name="levels" id="vo"}
                                  <option value="{$vo['level']}">{$vo['name']}</option>
                                  {/volist}
                                  </select>
                            </div>
                          </div>

                          <div class="layui-form-item">
                                <label class="layui-form-label" style="width: 130px; margin-left:-35px;">余额:</label>
                    <div class="layui-input-block" style="width:260px;">
                                  <input type="text" name="money" value="0" placeholder="请输入余额"   autocomplete="off" class="layui-input">
                                </div>
                              </div>

                              <div class="layui-form-item">
                                    <label class="layui-form-label" style="width: 130px; margin-left:-35px;">信用分:</label>
                    <div class="layui-input-block" style="width:260px;">
                                      <input type="text" name="score" value="0" placeholder="请输入信用分"   autocomplete="off" class="layui-input">
                                    </div>
                                  </div>
                              
                                  <div class="layui-form-item">
                                        <label class="layui-form-label" style="width: 130px; margin-left:-35px;">推荐人手机号:</label>
                    <div class="layui-input-block" style="width:260px;">
                                          <input type="text" name="pmobile" value=" " id="pmobile" placeholder="请输入推荐人手机号"   autocomplete="off" class="layui-input">
                                        </div>
                                      </div>
                            
 
                                      <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 130px; margin-left:-35px;" >个人形象照片:</label>
                                        <div class="layui-input-block" style="width:260px;">
                                               <input type="file" name="photo" required  lay-verify="required">
                                            </div>
                                          </div>

                                          <div class="layui-form-item">
                                                <label class="layui-form-label" style="width: 130px; margin-left:-35px;">手持身份证照:</label>
                                            <div class="layui-input-block" style="width:260px;">
                                                   <input type="file" name="photo_hand" required  lay-verify="required">
                                                </div>
                                              </div>



                                              <div class="layui-form-item">
                                                    <label class="layui-form-label" style="width: 130px; margin-left:-35px;">身份证正面:</label>
                                                <div class="layui-input-block" style="width:260px;">
                                                       <input type="file" name="id_card_pos" required  lay-verify="required">
                                                    </div>
                                                  </div>


                                                  <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 130px; margin-left:-35px;">身份证反面:</label>
                                                    <div class="layui-input-block" style="width:260px;">
                                                           <input type="file" name="id_card_con" required  lay-verify="required">
                                                        </div>
                                                      </div>  

            <div class="layui-form-item">
      
            <label class="layui-form-label" style="width: 130px; margin-left:-35px;">状态:</label>
            <div class="layui-input-block" style="width:260px;"> 
                  
                    <input type="radio" name="status"value="2" />审核中				
                    <input type="radio" name="status"value="1" />签约成功
      </div>
    </div>
    
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="*" type="submit">立即提交</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
      </div>
    </div>
    <!-- 更多表单结构排版请移步文档左侧【页面元素-表单】一项阅览 -->
  </form>
 
  <script>
   layui.use(['layer','form'],function(){
			form = layui.form;
			layer = layui.layer;
			$ = layui.jquery;
      form.render();
		});
    
    //各种基于事件的操作，下面会有进一步介绍
 
        
  </script>
 <script>
 form.on('submit(filter)',function(data){
  // layer.msg(JSON.stringify(data.field));
  //   return false;
});
 $('#pro').change(function(){
    $.ajax({
        type:"post",
        url:"{:url('add')}",
        data:'pro_id='+$('#pro').val(),
        dataType:"text",
        success:function(data){
            $('#city').html(data);
        }
    });
});

 
 
 </script>

 



     